package com.yanqu.road.server.cmd.activity.daomu;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.DaoMuProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.CmdApi;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.daomu.DaoMuActivityModule;
import com.yanqu.road.server.protocol.Protocol;

@CmdApi(reqMsg = DaoMuProto.DaoMuPveAttReportReqMsq.class, respMsg = DaoMuProto.DaoMuPveAttReportRespMsq.class)
@Cmd(code = Protocol.S_DAOMU_QUICK_PASS,desc = "盗墓笔记-快速过关")
public class DaoMuQuickPassCmd extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        DaoMuProto.DaoMuQuickPassReqMsg reqMsg = DaoMuProto.DaoMuQuickPassReqMsg.parseFrom(packet.getBytes());
        DaoMuProto.DaoMuQuickPassRespMsg.Builder respMsg = player.getModule(DaoMuActivityModule.class).quickPass(reqMsg);
        player.sendPacket(Protocol.U_DAOMU_QUICK_PASS, respMsg);
    }

    @Override
    public void sendData(GamePlayer player) {
    }
}
